import  requests


url = "https://movie.douban.com/j/chart/top_list"

#重装成对象
params = {
  "type": "24", #电影类型
  "interval_id": "100:90", #时间区间
  "action": "",
  "start": "0", #起始位置
  "limit": "20" #获取数量
}

headers ={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"}
resp = requests.get(url = url ,params = params,headers=headers)
print(resp.text)
resp.close()  #关闭连接

